<?php

require_once 'database.php';
require_once 'common.php';

$intTaskId = $_POST['taskUrl'];
$intStoryId = $_POST['id'];

$task = getTaskFromId($intTaskId, $intStoryId);

function getTaskFromId($intTaskIdParam, $intStoryIdParam){

	//Get the task from the database based on the ID
	$objTask = array();  //This will sit in memory waiting to be referenced by the HTML
	$objTask['story_id'] = $intStoryIdParam;
	
	echo json_encode($objTask);
}


header("content-type:application/json");
echo $task;
